Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
Hack

This hack places your PhotoPost forums on the index page of UBBThreads.

Additions for v2:

- XHTML compliant (Thanks Omegatron)
- Lightbulbs now work
- Cleaned up some html code
- Additional documentation

Example site: http://www.extremefitness.com

Left To Do:

- Optimize MySQL calls (doesnt cache data like threads does)
- Security not implemented (shows all groups)

Instructions:

In your ubbthreads.tmpl file in your templates/defaults directory, find around line 84:

echo <<<UBBTPRINT
<!-- END CATEGORY LOOP -->

AFTER that insert the contents of the attachment here.

Be sure to edit the paths and paramters for MySQL access to fit your site.

In my installation, I editted the pp-inc.php (topmenu function), showgallery.php and showphoto.php files to point HOME to the UBBThreads index.
Attachments
51892-photopost2.txt (0 Bytes, 101 downloads)

Last edited by extremebikini; 12/18/2002 12:51 PM.
Sponsored Links
Joined: Mar 2000
Posts: 21,080
Likes: 3
I type like Navaho
I type like Navaho
Joined: Mar 2000
Posts: 21,080
Likes: 3
looks good... does the search pages tie-in to each other?


- Allen wavey
- What Drives You?
Joined: Mar 2000
Posts: 21,080
Likes: 3
I type like Navaho
I type like Navaho
Joined: Mar 2000
Posts: 21,080
Likes: 3
I would suggest making the html part of the mod xhtml-compliant as well... a lot of work went into threads getting it there. I can assist if you like


- Allen wavey
- What Drives You?
Joined: Jul 2001
Posts: 442
Enthusiast
Enthusiast
Offline
Joined: Jul 2001
Posts: 442
Quick question, would having the pics displayed on the index page cause greater bandwidth?

Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
My next "project" is to convert all the HTML over to templates; so will get your help when I do that. I didnt want to put in all the effort upfront since I knew I would be redoing all of that soon enough. But as soon as I get going on templates, you're the guy I am going to call.

And, no, there is no other integration at this point. I plan to make a "deep intergration" hack which will use UBBThreads Whose Online, Last Visit, Search and others areas. (Don't ask, I dont know when I will be able to do all that; but hopefully not too far off!)

If the thumbnails are served off your host, then you will incur the bandwidth of displaying those thumbnails.

Sponsored Links
Joined: Oct 2001
Posts: 157
Member
Member
Offline
Joined: Oct 2001
Posts: 157


Yors Truly

Who? Me? Worry?
Joined: Feb 2002
Posts: 1,759
Addict
Addict
Offline
Joined: Feb 2002
Posts: 1,759
I saw that and replied over there, I would immagine that is the problem since it can't be remotely calling his script I'm going to install mine later today so I'll let everyone know how it goes.

Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
Well, that link would only be displayed if it were displaying the categories in the first place. I guess the question is - why arent any of your categories showing up.

Joined: Feb 2002
Posts: 1,759
Addict
Addict
Offline
Joined: Feb 2002
Posts: 1,759
oops, didn't see you reply here, I sent you another PM.

The more I looked at the code I realized that stuff before that should be showing up to begin with... but I can't tell what would be throwing it off. Its not displaying any errors or anything, so I dunno. I'm not a coder unfortunately

Joined: Oct 2001
Posts: 157
Member
Member
Offline
Joined: Oct 2001
Posts: 157
Ok, done!! Thanks Michael. A couple of creases still, and I have posted in the PP forum, whenever you have time

Thanks again


Yors Truly

Who? Me? Worry?
Sponsored Links
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Okay I have managed to make this hack XHTML Compliant. For those that want this the updated hack is attached.

Very simple to install. Just fill out your database info and paths to gallery etc. Place the code right above the send_footer line in ubbthreads.php

Totally XHTML Compliant.

Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
I've made an update to use the light bulbs. I'll doc the changes tomorrow and post it. Here's my site with the hack in place:

http://www.extremefitness.com

Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
I have posted the updated script in the first post of this thread. Enjoy!

Joined: Dec 2002
Posts: 173
Member
Member
Offline
Joined: Dec 2002
Posts: 173
Hi

Edit : I'v just had PhotoPost3.2 installed by them and threads is supposed to be integrated but there was no links between them.

I have made the link from II5.2 to PP. JUST A LINK

Q1. Does this hack put a link on the PPost index page so I can return to Threads/II5.2 ?

Q2. If so which attachment do I use as there is 2 on this thread ?

Edit: I've just re-read this thread and still don't know what it does?

Thanks

Last edited by Liahona; 01/08/2003 4:48 PM.

Thanks

Liahona
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
George,

This hack does not place a link back to UBBThreads. However that is very easy. In your photopost gallery find the file pp-inc.php. Look for the following code below:


if ( $rows > 0 )
$menu .= "<img border="0" src="{$Globals['idir']}/check.gif" alt="New Photos" /> ";

$menu .= "<a href="{$Globals['maindir']}/adm-index.php">{$Globals['pp_lang']['admin']}</a> | <a href="{$Globals['maindir']}/index.php">{$Globals['pp_lang']['home']}</a>";
}
else
$menu .= "<a href="{$Globals['maindir']}/index.php">{$Globals['pp_lang']['home']}</a>";


REPLACE IT WITH THE FOLLOWING FILLING OUT YOUR PATH TO THREADS:


if ( $rows > 0 )
$menu .= "<img border="0" src="{$Globals['idir']}/check.gif" alt="New Photos" /> ";

$menu .= "<a href="{$Globals['maindir']}/adm-index.php">{$Globals['pp_lang']['admin']}</a> | <a href="http://www.PATHTO/ubbthreads.php">{$Globals['pp_lang']['home']}</a>";
}
else
$menu .= "<a href="http://www.PATHTO/ubbthreads.php">{$Globals['pp_lang']['home']}</a>";



Joined: Jun 2002
Posts: 61
Power User
Power User
Offline
Joined: Jun 2002
Posts: 61
Hey!

I posted this on the PP site but thought I might have better luck here. I cannot get the 3rd level categories to show on the totals of the homepage.

I ahve attached a screenshot of what is showing for a single category.

Thanks for the help,

-Jason
Attachments
64556-index.jpg (0 Bytes, 46 downloads)

Joined: Jun 2002
Posts: 61
Power User
Power User
Offline
Joined: Jun 2002
Posts: 61
This is the corresponding pp index screenshot
Attachments
64557-ppindex.jpg (0 Bytes, 44 downloads)

Joined: Jun 2002
Posts: 61
Power User
Power User
Offline
Joined: Jun 2002
Posts: 61
Contents of my ubbtemplate-

Attachments
64558-ubbthreadstmpl.txt (0 Bytes, 308 downloads)

Joined: Mar 2000
Posts: 21,080
Likes: 3
I type like Navaho
I type like Navaho
Joined: Mar 2000
Posts: 21,080
Likes: 3
When I add this as directed, I get this error:

[]
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in D:\wwwroot\fiebre.com\ubbthreads\templates\default\ubbthreads.tmpl on line 126
[/]


- Allen wavey
- What Drives You?
Joined: Dec 2002
Posts: 173
Member
Member
Offline
Joined: Dec 2002
Posts: 173
Hi Chuck

Just read your reply, been busy adding lots of hacks (some with your help - thanks).

Yes it works fine - just changed the address to index.php to point to II5.2

Thanks


Thanks

Liahona
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Allen,

That's usually a misplaced bracket or something somewhere before that line.

Paste that section (a little before that line number here) and I'll look.

Joined: Mar 2000
Posts: 21,080
Likes: 3
I type like Navaho
I type like Navaho
Joined: Mar 2000
Posts: 21,080
Likes: 3
thank you... I added some print statements and it shows up, but needs some other html (perhaps an open and close table) for it to look right

http://www.fiebre.com/ubbthreads/ubbthreads.php


- Allen wavey
- What Drives You?
Joined: Mar 2000
Posts: 21,080
Likes: 3
I type like Navaho
I type like Navaho
Joined: Mar 2000
Posts: 21,080
Likes: 3
ok

this is what it needs:

==========================================================

FIND in ubbthreads.tmpl:
Code
<br />echo <<<UBBTPRINT<br /><!-- END CATEGORY LOOP --><br /><!-- END OF FORUM LOOP --><br /></table><br /></td><br /></tr><br /></table><br /><br /><br /><br />$tbopen<br />

REPLACE WITH:
Code
<br />echo <<<UBBTPRINT<br /><!-- END CATEGORY LOOP --><br /><br /><!-- END OF FORUM LOOP --><br /></table><br /></td><br /></tr><br /></table><br />UBBTPRINT;<br /><br />echo <<<UBBTPRINT<br /><br /><br />$tbopen<br />

=============================================

then place the code provided in the first post in this thread above :
Code
<br />echo <<<UBBTPRINT<br /><br /><br />$tbopen<br />


that will fix the layout probs


- Allen wavey
- What Drives You?
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Actually if we look at the mistake made in the release version of the template I use this and it works

echo <<<UBBTPRINT
<!-- END CATEGORY LOOP -->
<!-- END OF FORUM LOOP -->
$tbclose
UBBTPRINT;
photopost code here!
echo <<<UBBTPRINT
<br />
$tbopen

Joined: Mar 2000
Posts: 21,080
Likes: 3
I type like Navaho
I type like Navaho
Joined: Mar 2000
Posts: 21,080
Likes: 3
good eye it does need a tbclose there instead of the html


- Allen wavey
- What Drives You?
Joined: Aug 2002
Posts: 111
Journeyman
Journeyman
Offline
Joined: Aug 2002
Posts: 111
I actually managed to integrate this hack into my site and it kinda works! No one is more surprised that I could do this than I am

The issues I'm having:

My biggest PP subcat shows on the UBBT page as having 0 posts and 0 uploads. Why won't the correct numbers show?

One of my top-level gallery categories isn't showing up -- I'm only seeing two of the three. It's the only category with no sub-categories, if that's related.

The "lightbulbs" don't change once gallery threads are viewed. If the category has photos in it, the lightbulb stays yellow.

How do I put a title above the displayed photos (something like, "Most recent additions to our gallery"?


I'm using the current release of Photopost, and UBBT 6.2.

Thanks!

Joined: Jun 2002
Posts: 61
Power User
Power User
Offline
Joined: Jun 2002
Posts: 61
Yeah, same problem I posted above, lower level cats arent totalling up for some reason.

-Jason

Joined: Oct 2000
Posts: 53
Junior Member
Junior Member
Offline
Joined: Oct 2000
Posts: 53
Me too!
I'm having same problem here....

I'm using Photopost 3.2 with Ubbtheads 6.2(last release)

Thanks
Junhyok

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Guys Extremebikini has noted all problems with this hack and in his spare time has said over in the photopost forum that he is working on this when time permits.

I have updated it use the $tbopen and $tbclose variables for flexibility and those that use the table wrappers from here.

I will look into the categories and try a few things out myself although I have never used subcategories I shall see if I can get it to work.

I posted another update in my next post to correct most issues.

Last edited by omegatron; 01/20/2003 8:57 PM.
Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
Sorry, guys; been real busy with some new products and havent had time to go back and work on this. I havent even been able to load 6.2 myself yet!

I was able to make light bulbs work on my current release - but I havent tried it with 6.2 yet. Unless someone gets to it before me it will be a week or two (at least).

Joined: Jun 2002
Posts: 61
Power User
Power User
Offline
Joined: Jun 2002
Posts: 61
No problem and thanks for the hard work!

Joined: Oct 2000
Posts: 53
Junior Member
Junior Member
Offline
Joined: Oct 2000
Posts: 53
Thanks a lot! guys...

Junhyok

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Okay,

To summarize what has been done. The only issue I that has to be cleared up is the cookie issue which Michael is working on.

1) Totally XHTML Compliant
2) Updated to use $tbopen and $tbclose
3) Subcategories are now being included in the main count ( Keep in mind this hack does not display subcategories on the main threads page nor is it designed to. )

The only issue I see left is cookies. Follow the directions in the attachment.

ADDED 2-9-03:

Directions have been tweaked to take the user information out of template and put into PHP file for security issue.
Attachments
65702-photopost.zip (0 Bytes, 28 downloads)

Last edited by omegatron; 02/09/2003 8:21 AM.
Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
Hate to be the doorknob, but I cant remember what cookie problem.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
For the cookies to work and update

Right now the lightbulbs stay on all the time.

You had meantioned you might have had a bit of code also in ubbthreads.php so that it would recognize and update the lightbulbs. Just like you had that query routine that got the counts for the thread totals and such.

Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
Oh, right; I have the code for that. Its not a cookie thing, its just the code I had to add. I'll email you my new ubbthreads file so you can see if and yank it out.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Thanks thats the one thing left. I guess I should have said light bulb problem. God knows I hate seeing those yellow light bulbs all the time.

Joined: Mar 2000
Posts: 21,080
Likes: 3
I type like Navaho
I type like Navaho
Joined: Mar 2000
Posts: 21,080
Likes: 3
ennyone tried this recently? I kept getting table problems around the photopost stuff, like something was missing... anyways I used the code from the first post and the touchups from the second page and it looks ok.


- Allen wavey
- What Drives You?
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
I use the last version I posted and it validates and looks okay. I am still waiting on Michael to send what code he has inserted into ubbthreads.php to make the lightbulbs work.

The original one posted here is not XHTML compliant and uses the old table structure.

Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
I'll send it in the morning; just about got 3.3 done and finished ReviewPost this week, too!..... phew*

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Oh my your making my day. A new version of Photopost to play with soon and finally Reviewpost HMM I am gonna be busy.

I assume your sticking with 3.3 being the CSS version with templates coming later in like 3.4? At least thats what I remember on our last conversation.

Joined: Aug 2002
Posts: 111
Journeyman
Journeyman
Offline
Joined: Aug 2002
Posts: 111
I'm having one problem with this integration.

I only employed part of the hack. On my Threads board, I have a row of photos that says, "The latest photos added to our Photo Gallery". There, I call the 5 latest pics that have been uploaded, and the hack works fine.

I'd like to restrict these pics to the 5 latest photos uploaded from one specific gallery. However, when I try to edit the hack to list the gallery id (in my case, 503), I end up getting an error (the page stops loading after the "5 latest pics" title). I assume the line of code where I'm having problems is the one that reads:

$forcats = "";

I can't figure out what I'm doing wrong. I just insert the category number inside the quotes, right?

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Coy,

You can thank JoshPet for this fix. The code was missing a farther defining. It needs the following peice of code in there.

BELOW this:

// which type of images do you want to show
$q_switch = "random";


ADD THIS:

if ($forcats) {
$forcats = "AND cat = '$forcats'";
}


I already tested this and it works great. Kudos to Josh.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369


Coy can't seem to get away from me.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
LOL

Yes well what would alot of people do around here without you to help them out

Joined: Aug 2002
Posts: 111
Journeyman
Journeyman
Offline
Joined: Aug 2002
Posts: 111
[]

Coy can't seem to get away from me. [/]

Thank goodness!

Thanks to Josh (and everyone involved) for the fix. I'll go give it a try now.

Joined: Aug 2002
Posts: 111
Journeyman
Journeyman
Offline
Joined: Aug 2002
Posts: 111
I never did get back here to comment that this fix still doesn't work for me. If I try to specify a category, I end up with no photos displaying at all. I've tried a bunch of different category numbers with no success.

Also, I just noticed that My Optional Stats box doesn't display all the stats it should. Currently, it says:

599 Registered User(s).; threads and page views.
324 photos posted with 22,536 page views.

You can see it's missing the total number of threads and page views. Have I set a path incorrectly? I tried to install the mod again using the most recent version in this thread, but the same thing happens.

Thanks, as always

http://www.iyarilimon.com/ubbthreads/ubbthreads.php

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Coy,

Try this it works as I am using this on my site
if ($forcats) {
$forcats = "AND cat = '$forcats'";
}

Then as far as the most version of this hack. You forgot the first step! Your right though Michael's hack has this left out. I had to tweak a few things. There is a query you have to add to ubbthreads.php Check the hack and install the part in that file for the stats to show.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
The most recent rendition of this hack is on page four.

Here is the code from the hack you need to add that your missing.

In Ubbthreads.php after:

// ---------------------
// Grab the tablewrapper
list($tbopen,$tbclose) = $html -> table_wrapper();

add this:

$sth = $dbh->do_query("
SELECT COUNT(B_Topic), SUM(B_Counter)
FROM {$config['tbprefix']}Posts
GROUP BY B_Topic
ORDER BY B_Topic
");
list($num_replies, $num_threads, $num_thread_views) = array(0, 0, 0);
$num_rows = $dbh->total_rows($sth);
if ($num_rows >= 1) {
list($num_replies) = $dbh->mysql_fetch_row($sth);
if ($num_rows >= 2) {
list($num_threads, $num_thread_views) = $dbh->mysql_fetch_row($sth);
}
}
$dbh->finish_sth($sth);
$num_posts = $num_threads + $num_replies;

Joined: Aug 2002
Posts: 111
Journeyman
Journeyman
Offline
Joined: Aug 2002
Posts: 111
Omegatron << Then as far as the most version of this hack. You forgot the first step! >>

You are absolutely correct -- I had neglected the ubbthreads.php portion of this mod. Unfortunately, now that I've added it (and verified that I've included the recent fix for displaying particular categories), it still isn't working.

As you know, I've had problems with other aspects of Photopost when mods are concerned. For now, I'll chalk this up to quirks of my system, and ask Josh to do some investigative work for me while he works on my elusive "table wrappers" issue.

Joined: Nov 2001
Posts: 52
Power User
Power User
Offline
Joined: Nov 2001
Posts: 52
Hi All,

It has been a while since I actively added anything here, but this hack has a serious !!! security issue in it.

I will not post it here but I should be very carefull in applaying it as it gives others some most usefull info.

I sended a PM to omegatron about it.

Best Regards,
Boris

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
That is just so weird. All the thing in ubbthreads.php is a query to get the totals. The defined output is called in the table in the template. I tell you YOU AND PHOTOPOST have issues.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Boris it isnt my hack but I have modified the version here of mine on page 4 with a fix for this security hole. I have emailed the main author of this program to place this fix on all of his sites and his version of the hack as well.

Thanks for the heads up.

Although one can see the MYSQL password info. If everyone sets their host to localhost which everyone does anyway there is no way for them to use the information they can see. However it is best to move that into a PHP file which I did and then set a require statement in the template to use such said file.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
[]Coy,

Try this it works as I am using this on my site
if ($forcats) {
$forcats = "AND cat = '$forcats'";
}

Then as far as the most version of this hack. You forgot the first step! Your right though Michael's hack has this left out. I had to tweak a few things. There is a query you have to add to ubbthreads.php Check the hack and install the part in that file for the stats to show.
[/]

Omegatron.... my fix doesn't work if you want to list more than one category like this:

$forcats = "511,507,522";


Modify the code like this:

if ($forcats) {
$forcats = "AND cat in ($forcats)";
}


That will allow for multiple categories to be included.

Coy's problem was that she was listing the main categories... which had no photos.... you have to list the category number of the subcategory which actually has the photos.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
LOL I thought I pasted the new code in their. To many freaking files. I do know it works though as I am using it

Joined: Oct 2002
Posts: 165
Member
Member
Offline
Joined: Oct 2002
Posts: 165
Anybody encounter and fix the issue with Username changes in UBBT, which does not change the username in Photopost?

I allowed several name changes and now have users wanting to re-upload ther same photos under their new name.

Thanks

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Mike,

Try this fix and you should be set.

Okay at line 1067 find this code:

if ( $Globals['vbversion'] == "w3t6" ) {
$profilelink = "{$Globals['vbulletin']}/showprofile.php?Cat=&User=$tusername&Number=$tuserid";
$postreply = "<font color="{$Globals['headfontcolor']}" face="{$Globals['mainfonts']}" size="{$Globals['fontmedium']}"><b>Post a Reply</b></font>";
}
else {
$profilelink = "{$Globals['vbulletin']}/showprofile.php?Cat=&user=$tusername";


REPLACE WITH:

if ( $Globals['vbversion'] == "w3t6" ) {
$profilelink = "{$Globals['vbulletin']}/showprofile.php?Cat=&User=$tuserid";
$postreply = "<font color="{$Globals['headfontcolor']}" face="{$Globals['mainfonts']}" size="{$Globals['fontmedium']}"><b>Post a Reply</b></font>";
}
else {
$profilelink = "{$Globals['vbulletin']}/showprofile.php?Cat=&user=$tuserid";

Joined: Oct 2002
Posts: 165
Member
Member
Offline
Joined: Oct 2002
Posts: 165
Chuck,

Thanks for the quick response.

That fix allows me to interact with the UBBT DB from PP, but I don't know that it will correct the underlying issue...
- Username "AA" establishes a member gallery and photos are referenced as "Member: AA"

- User AA changes display name to "BB" in UBBT

- Photopost gallery still refernces "Member: AA".

The link in PP will bring you to the correct member profile in UBBT, but the point is that the photos in PP are referencing another name than what the user is now displaying.

As I do this.... I remembered that I chose to access the UBBT DB through PP, but I use a seperate MySql DB for PP. I thought using a seperate MySql would be easier if I ever had to split the UBBT and PP onto different servers due to high demands.

Mike


Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Give me a few to look through the files and see what I can find out.

Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
Code
    $num_rows = $dbh->total_rows($sth);<br />    if ($num_rows >= 1) {<br />        list($num_replies,$num_thread_views) = $dbh->mysql_fetch_row($sth);<br />        if ($num_rows >= 2) {<br />            list($num_threads) = $dbh->mysql_fetch_row($sth);<br />        }<br />    }


I had to make a slight change to this section to get the right numbers to show up.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Cool you are the php guru

I can't wait till you upgrade to 6.2 so we can finally get the lightbulbs to work right.

Joined: Feb 2002
Posts: 950
Hacker
Hacker
Offline
Joined: Feb 2002
Posts: 950
Code
   $userob = new user; <br />   $user = $userob -> authenticate("U_FrontPage, U_Groups, U_TimeOffset,U_Display,U_Favorites,U_WhichForums,U_Categories,U_Number"); <br />        $Username = $user['U_Username']; <br />   $UserID = $user['U_Number']; <br />


You need this piece in the ubbthreads.php and the light bulbs will work. Notice the addition on U_Number and the assignment of $UserID

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Sweet!!

Knew it was something simple. You the man!!

Page 2 of 2 1 2

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
JAISP
JAISP
PA
Posts: 449
Joined: February 2008
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 1514
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 28
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)